﻿<%if not in_sdcms then response.write("template load fail"):response.end() end if%><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="Keywords" content="{sdcms[seokey]}" />
<meta name="Description" content="{sdcms[seodesc]}" />
<title>{sdcms[webname]} - powered by sdcms</title>
<link href="{webroot}lib/css/base.css" rel="stylesheet" type="text/css" />
<link href="{webroot}theme/default/css/public.css" rel="stylesheet" type="text/css" />
<link href="{webroot}theme/default/css/user_base.css" rel="stylesheet" type="text/css" />
<link href="{webroot}theme/default/css/user.css" rel="stylesheet" type="text/css" />
<link href="{webroot}theme/default/css/user_reg.css" rel="stylesheet" type="text/css" />
<script>var webroot="{webroot}";</script>
<script src="{webroot}lib/js/jquery.js"></script>
<script src="{webroot}lib/js/jquery-migrate-1.1.0.min.js"></script>
<script src="{webroot}lib/tips/jquery.tips.js"></script>
<script src="{webroot}lib/js/base.js"></script>
<script src="{webroot}lib/js/mobile.js"></script>
<script src="{webroot}lib/validator/jquery.validator.js"></script>
<script src="{webroot}lib/validator/zh_CN.js"></script>
<script src="{webroot}theme/default/js/sdcms.js"></script>
{dim userdata:userdata=sdcms.userinfo}
<script>
$(function(){
	
	$(".form_pass").validator(
	{
		stopOnError:true,
		theme:'yellow_right_effect',
		ignore:':hidden',
		valid:function(form)
		{
			$.fn.tips({type:'loading',content:'数据提交中'});
			$.ajax(
			{
				url:"?act=checkdb",
				type:"post",
				data:$(form).serialize(),
				success:function(data){
					data=jQuery.parseJSON(data);
					var type="warn";
					if(data.status=="y"){type="ok";}
					$.fn.tips({type:type,content:data.info});
					if(data.status=="y")
					{
						setTimeout("location.href='?'",1000);
					}
				}
			});
		}
	});
	
	$(".c_password").blur(function(){
	var value=$(this).val();
	var box=$('#strength');
	if (value==''||value==null){
				box.removeClass().addClass('nothing').text('');
				return false;
			} else if (value.length<6){
				box.removeClass().addClass('nothing').text('密码过短');
			} else {
				var score=passwordGrade(value);
				if (score<11){
					box.removeClass().addClass('nothing').text('不安全');
				} else if (score<21){
					box.removeClass().addClass('strength normal').text('安全程度：低');
				} else if (score<31){
					box.removeClass().addClass('strength general').text('安全程度：中');
				} else if (score>30){
					box.removeClass().addClass('strength special').text('安全程度：高');
				}
			}
	});
	$("#user_menu_12").addClass("hover");
});
</script>
</head>
<body>
    {sdcms:include("../sdcms_head.asp")}
    
    <div id="position">您所在的位置：<a href="{webroot}">首页</a> > <a href="./">会员中心</a></div>
    <div class="w980 mt10 mc">
        {sdcms:include("sdcms_menu.asp")}
        <div class="right_big">
            <div class="b">
                <div class="subject">修改密码</div>
                <div class="p35">
                
                   <form class="form_pass" method="post">
                   <ul id="reg">
                       <li><em>用户名：</em>{userdata(1)}</li>
                       <li><em>原密码：</em><input type="password" name="oldpass" class="ip w01" maxlength="16" data-rule="原密码:required;password;remote[ajax.asp?act=oldpass]" /></li>
                       <li><em>新密码：</em><input type="password" name="password" class="ip w01 c_password" maxlength="16" data-rule="新密码:required;password;" /></li>
                       <dd><div id="strength"></div></dd>
                       <li><em>确认新密码：</em><input type="password" name="repass" class="ip w01" maxlength="16" data-rule="确认新密码:required;password;match(password)" /></li>
                       <dd><input type="submit" value="修改密码" class="bnt_blue" /> <input type="button" value="取消" onclick="location.href='javascript:history.go(-1)'" class="bnt_blue" /></dd>
                   </ul>
                   </form>
                
                </div>
            </div>
        </div>
    </div>
    {sdcms:include("../sdcms_foot.asp")}